import {
  createWebHistory,
  createRouter
} from 'vue-router'


/**
 * 
 * @returns {components} 组件
 */



const demo = () => import('./demo/index.vue')
const quizjobs = () => import('./demo/quizjobs.vue')
/**
 * @param {dynamicRoutes} 动态路由
 */

/**
 * @param {routes} 静态路由
 */
let routes = [
  {
    path: '/',
    name: 'Index',
    component: demo,
    meta: {
      name: '演示管理'
    },
  },
  {
    path: '/quizjobs/:gid(\\d+)',
    name: 'QuizJobs',
    component: quizjobs,
    meta: {
      name: '考场监控',
      noNav: true,
      KeepAlive: false
    },
  },
  {
    path: '/demo',
    name: 'Demo',
    component: demo,
    meta: {
      name: '演示',
      noNav: true,
      KeepAlive: false
    },
  },
  {
    path: '/freelist',
    name: 'FreeList',
    component: demo,
    meta: {
      name: '演示',
      noNav: true,
      KeepAlive: false
    },
  },  
]

const router = createRouter({
  history: createWebHistory('/'),
  routes
})


export default router